package com.medical.admin.hospital.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.medical.admin.hospital.entity.Hospital;
public interface HospitalMapper extends BaseMapper<Hospital> {
    default Hospital findByHospitalName(String hospitalName){
        LambdaQueryWrapper<Hospital> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(hospitalName!=null,Hospital::getHospitalName,hospitalName);
        return this.selectOne(queryWrapper);
    };
}